R[8] x 8 bit, M[256] x 8 bit

Phase 0:
M[IP] -> I

Phase 1:
If not exp with IP write: IP + 1 -> IP
If using V: M[IP + 1] -> C, IP + 2 -> IP
If not UCF command: 0 -> UCF
I -> Decode as:

Arg A -> ALU.A
Arg B or ~Arg B -> ALU.B
(CF.Read && UCF) ^ (SUB || CMP) -> ALU.InC
ALU.C ^ (SUB || CMP) -> CF
Arg A[7] ^ Arg B[7] ^ CF -> SF
(ALU.F != 0) -> ZF

11BBBAAA ADD A, B: R[A] + R[B] + (CF && UCF) -> R[A] -> CF, ZF, SF
10BBBAAA SUB A, B: R[A] - R[B] - (CF && UCF) -> R[A] -> CF, ZF, SF
01BBBAAA MOV A, B: R[B] -> R[A]
00111AAA ADDV A, V: R[A] + C + (CF && UCF) -> R[A] -> CF, ZF, SF
00110AAA CMPV A, V: R[A] - C - (CF && UCF) -> CF, ZF, SF
00101AAA RD A: M[R[A]] -> R[0]
00100AAA WR A: R[0] -> M[R[A]]
00011AAA RV A, V: C -> R[A]
00010AAA J A: R[A] -> IP
00001111 JGE V: If !SF: С -> IP
00001110 JG V: If !SF && !ZF: С -> IP
00001101 JLE V: If SF || ZF: С -> IP
00001100 JL V: If SF: С -> IP
00001011 JAE V: If !CF: С -> IP
00001010 JA V: If !CF && !CF: С -> IP
00001001 JBE V: If CF || ZF: С -> IP
00001000 JB V: If CF: С -> IP
00000111 JE V: If ZF: С -> IP
00000110 JNE V: If !ZF: С -> IP
00000101 JV V: С -> IP
00000100 CALL V: IP + 2 -> R[7], С -> IP
00000011 UCF: 1 -> UCF
00000010 ???
00000001 DBG
00000000 NOP